const CityzonesGrids = require("./zonesGridsInSavageMap");
const SafetyZoneData = require("./SavageMap_SafetyZone_20000.json");

// debugger
for (let o of CityzonesGrids) {
  let valueSum = 0;
  for (let xi = o.zone_range[0][0]; xi <= o.zone_range[1][0]; xi++) {
    for (let yi = o.zone_range[0][1]; yi <= o.zone_range[1][1]; yi++) {
      valueSum += SafetyZoneData.GRIDS_IN_SMALL[xi][yi]
    }
  }
  // debugger
  let ave = valueSum / o.grids_count;
  console.log(o.name, "|", valueSum, "|", ave);
  // debugger
}